package com.exp.service;

import com.exp.dao.AdminMapper;
import com.exp.dao.more.MoreAdminMapper;
import com.exp.model.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 Created by guojianyu on 2016/1/24.
 */
@Service
@Transactional
public class AdminService {
 @Autowired
 private MoreAdminMapper moreAdminMapper;
 @Autowired
 private AdminMapper adminMapper;
 public List<Admin> getList(Map<String,Object> param){
  return moreAdminMapper.getList(param);
 }
 public int delete(Integer id){
   return  adminMapper.deleteByPrimaryKey(id);
 }
 public int add(Admin admin){
   return  adminMapper.insertSelective(admin);
 }
 public int update(Admin admin){
   return  adminMapper.updateByPrimaryKeySelective(admin);
 }
 /*用户登录*/
 public List<Admin> adminLogin(Map map){
  List<Admin> list=moreAdminMapper.adminLogin(map);
  return list;
 }
}
